1. Field of the Invention
The present invention relates to the region segmentation of an image, and in particular, relates to an image processing method and an image processing apparatus for segmenting an image into regions based on an attribute.
2. Description of the Related Art
As a technique for segmenting an image into a plurality of regions to have the same attribute such as color, texture, or coordinates, a region segmentation technique is used. The segmented regions allow an encoding process, image processing, and image recognition with respect to each segmented region. Thus, it becomes possible to implement new applications in various image processing apparatuses. In recent years, an embedded system often performs image processing, and therefore, a faster region segmentation technique for the embedded system is receiving attention.
Conventionally, various techniques are proposed regarding the region segmentation of an image. Some techniques for segmenting an image into regions by clustering pixels are disclosed in the publication of Japanese Patent No. 5127738 and the following dissertations 1, 2, and 3.
Dissertation 1: Tse-Wei Chen, et al., “Photo Retrieval based on Spatial Layout with Hardware Acceleration for Mobile Devices,” IEEE Transactions on Mobile Computing, vol. 10, no. 11. pp. 1646-1660, November 2011.
Dissertation 2: Radhakrishna Achanta, et al., “SLIC Superpixels Compared to State-of-the-Art Superpixel Methods,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, No. 11, pp. 2274-2282, November 2012.
Dissertation 3: C. Y. Ren and I. Reid., “gSLIC: a real-time implementation of SLIC superpixel segmentation,” Technical Report University of Oxford, Department of Engineering, 2011.
The technique in the publication of Japanese Patent No. 5127738 is an algorithm for speeding up clustering. This technique first compares a processing target pixel with representative data in a cluster to which a neighboring pixel belongs, and if the distance in a color space between the processing target pixel and the representative data is small, causes the processing target pixel to go with the cluster to which the neighboring pixel belongs.
The technique in dissertation 1 implements a photograph search system based on the content of an image, using hardware for conventional “k-means clustering”. This technique achieves the speeding up of the calculation of a distance, using hardware having a high degree of parallelism.
The technique in dissertation 2 generates small regions termed superpixels, using an algorithm termed “Simple Linear Iterative Clustering (SLIC)” for speeding up clustering. This technique limits the search range for the nearest representative data and therefore needs only a smaller amount of calculation than conventional “k-means clustering”.
The technique in dissertation 3 is a technique for implementing a graphics processing unit (GPU) by improving the algorithm termed “SLIC” in dissertation 2. This technique limits the search range for the nearest representative data to 3×3 pixels to speed up the processing.
Clustering is a technique essential for image recognition and machine learning. As described above, a clustering algorithm is a technique often used in the region segmentation of an image. When clustering is performed, representative data in each cluster may be obtained, and a pixel (hereinafter referred to as “input data”) may be assigned to the representative data. In this case, it is necessary to search for the nearest representative data by calculating the distance between the input data and each of a plurality of pieces of representative data.
If clustering is implemented in an embedded system, the degree of parallelism of hardware and the circuit size vary depending on the amount of calculation required to calculate the distance between the input data and each of the pieces of representative candidate data. To reduce the circuit size, various countermeasures to achieve a lightweight algorithm for clustering or reduce the amount of calculation are desired.
The publication of Japanese Patent No. 5127738 discusses a technique for comparing input data of interest with a cluster to which neighboring input data belongs, and discontinuing a calculation based on a threshold. In dissertation 1, the speeding up is achieved using hardware having a high degree of parallelism. In dissertations 2 and 3, the algorithm is sped up. However, even if the above conventional art is used, to cluster high resolution image data at high speed, the amount of calculation for calculating the distance is great.